{template 'common/header'}
{if $operation == 'display'}
<div class="main panel panel-default">
	<div class="panel-body table-responsive">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:30px;">ID</th>
					<th style="text-align: center;">标题</th>
					<th style="text-align: center;">会员名称</th>
					<th style="text-align: center;">视频名称</th>
					<th style="text-align: center;">满意度</th>
					<th style="text-align: center;">审核状态</th>
					<th style="text-align: center;">操作</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $item}
				<tr>
					<td style="vertical-align: inherit;">{$item['id']}</td>
					<td style="text-align: center;vertical-align: inherit;">{$item['title']}</td>
					<td style="text-align: center;vertical-align: inherit;">{$item['nick_name']}</td>
					<td style="text-align: center;vertical-align: inherit;">{$item['name']}</td>
					<td style="text-align: center;vertical-align: inherit;">{$item['satisfaction']}</td>
					<td style="text-align: center;vertical-align: inherit;">{$check_status[$item['check_status']]}</td>
					<td style="text-align:center;font-size: 10px;vertical-align: inherit;">
						<a href="{php echo $this->createWebUrl('comment', array('op' => 'post', 'id' => $item['id']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="审核"><i class="fa fa-edit"></i></a>
						<a href="{php echo $this->createWebUrl('comment', array('op' => 'delete', 'id' => $item['id']))}" onclick="return confirm('确认删除吗？');return false;" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="删除"><i class="fa fa-times"></i></a>
					</td>
				</tr>
				{/loop}
			</tbody>
		</table>
		{$pager}
	</div>
</div>
{elseif $operation == 'post'}
<div class="main">
	<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" onsubmit='return formcheck()'>
		<div class="panel panel-default">
			<div class="panel-heading">
				信息
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">评论标题</label>
					<div class="col-sm-9 col-xs-12">
						<input type = 'text' value="{$comment['title']}" class="form-control" readonly="readonly" disabled="disabled"/>
					</div>
				</div>
				<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">会员名称</label>
                    <div class="col-sm-9 col-xs-12">
						<input type = 'text' value="{$comment['nick_name']}" class="form-control" readonly="readonly" disabled="disabled"/>
                    </div>
                </div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">视频名称</label>
					<div class="col-sm-9 col-xs-12">
						<input type = 'text' value="{$comment['name']}" class="form-control" readonly="readonly" disabled="disabled"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">评论内容</label>
					<div class="col-sm-9 col-xs-12">
						<textarea cols="30" rows="10"  class="form-control" style="resize:none;" readonly="readonly" disabled="disabled">{$comment['content']}</textarea>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">满意度</label>
					<div class="col-sm-9 col-xs-12">
						<input type = 'text' style="width:50%;" value="{$comment['satisfaction']}" class="form-control" readonly="readonly" disabled="disabled"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">标签</label>
					<div class="col-sm-9 col-xs-12">
						{loop $sign $item}
							<input type = 'text' style="width:20%;float:left;margin:5px;" value="{$item['name']}" class="form-control" readonly="readonly" disabled="disabled"/>
						{/loop}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>审核状态</label>
					<div class="col-sm-9 col-xs-12">
						<label class='radio-inline'>
							<input type='radio' name='check_status' value='1' {if $comment['check_status']==1}checked{/if} /> 通过
						</label>
						<label class='radio-inline'>
							<input type='radio' name='check_status' value='2' {if $comment['check_status']==2}checked{/if} /> 不通过
						</label>
					</div>
				</div>
            </div>
		</div>
		<div class="form-group col-sm-12">
			<input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
			<input type="hidden" name="id" value="{$comment['id']}" />
			<input type="hidden" name="token" value="{$_W['token']}" />
		</div>
	</form>
</div>
<script language='javascript'>
	function formcheck() {
		if ($("[name='check_status']:checked").val() == undefined || $("[name='check_status']:checked").val() == '') {
			util.message("请选择审核状态");
			return false;
		}
		return true;
	}
</script>
{/if}

{template 'common/footer'}